package com.hjm.project.terminal.detail.service.impl;

import java.util.List;

import com.hjm.project.terminal.detail.domain.TerminalRecordDetail;
import com.hjm.project.terminal.detail.mapper.TerminalRecordDetailMapper;
import com.hjm.project.terminal.detail.service.ITerminalRecordDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjm.common.utils.text.Convert;

/**
 * 终端调拨详情Service业务层处理
 * 
 * @author LOVE
 * @date 2020-11-28
 */
@Service
public class TerminalRecordDetailServiceImpl implements ITerminalRecordDetailService
{
    @Autowired
    private TerminalRecordDetailMapper terminalRecordDetailMapper;

    /**
     * 查询终端调拨详情
     * 
     * @param id 终端调拨详情ID
     * @return 终端调拨详情
     */
    @Override
    public TerminalRecordDetail selectTerminalRecordDetailById(Long id)
    {
        return terminalRecordDetailMapper.selectTerminalRecordDetailById(id);
    }

    /**
     * 查询终端调拨详情列表
     * 
     * @param terminalRecordDetail 终端调拨详情
     * @return 终端调拨详情
     */
    @Override
    public List<TerminalRecordDetail> selectTerminalRecordDetailList(TerminalRecordDetail terminalRecordDetail)
    {
        return terminalRecordDetailMapper.selectTerminalRecordDetailList(terminalRecordDetail);
    }

    /**
     * 新增终端调拨详情
     * 
     * @param terminalRecordDetail 终端调拨详情
     * @return 结果
     */
    @Override
    public int insertTerminalRecordDetail(TerminalRecordDetail terminalRecordDetail)
    {
        return terminalRecordDetailMapper.insertTerminalRecordDetail(terminalRecordDetail);
    }

    /**
     * 修改终端调拨详情
     * 
     * @param terminalRecordDetail 终端调拨详情
     * @return 结果
     */
    @Override
    public int updateTerminalRecordDetail(TerminalRecordDetail terminalRecordDetail)
    {
        return terminalRecordDetailMapper.updateTerminalRecordDetail(terminalRecordDetail);
    }

    /**
     * 删除终端调拨详情对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTerminalRecordDetailByIds(String ids)
    {
        return terminalRecordDetailMapper.deleteTerminalRecordDetailByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除终端调拨详情信息
     * 
     * @param id 终端调拨详情ID
     * @return 结果
     */
    @Override
    public int deleteTerminalRecordDetailById(Long id)
    {
        return terminalRecordDetailMapper.deleteTerminalRecordDetailById(id);
    }
}
